import request from '@/utils/http'
// 登录
export function login(data: any): any {
  return request({
    url: '/api/users/login',
    method: 'post',
    data
  })
}
// 忘记密码
export function findPwd(data: any): any {
  return request({
    url: '/api/rules/findPwd',
    method: 'post',
    data
  })
}
// 修改密码
export function changePwd(data: any): any {
  return request({
    url: '/api/users/changePwd',
    method: 'post',
    data
  })
}
// 帐户信息
export function allUsers(params?: any): any {
  return request({
    url: '/api/users/allUsers',
    method: 'get',
    params
  })
}
// 添加帐户信息
export function addUser(data: any): any {
  return request({
    url: '/api/users/addUser',
    method: 'post',
    data
  })
}
// 编辑帐户信息
export function editUser(id: any, params: any): any {
  return request({
    url: `/api/users/editUser/${id}`,
    method: 'post',
    params
  })
}
// 删除帐户信息
export function deleteUser(params: any): any {
  return request({
    url: `/api/users/deleteUser/${params}`,
    method: 'delete',
  })
}